package com.codeoss.framework.view.renderer;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.codeoss.framework.context.YunContext;
import com.codeoss.framework.view.component.Component;
import com.codeoss.framework.view.service.IFilterGroupComponentService;

@Service("filtergroupRenderer")
public class FilterGroupRenderer extends CommonComponentRenderer {
	@Autowired
	private IFilterGroupComponentService filterGroupComponentService;
	
	@Override
	protected PropSerializeMap startRenderProp(YunContext yunContext,
			Component component, ViewPropMap viewPropMap) {
		PropSerializeMap propSerializeMap=super.startRenderProp(yunContext, component, viewPropMap);
		List<Map<String,String>> mapList=filterGroupComponentService.getFilterList(yunContext, component);
		propSerializeMap.put("data", mapList);
		return propSerializeMap;
	}
}
